home *** CD-ROM | disk | FTP | other *** search
/ Business Shareware / Business Shareware.iso / start / database / lib194 / readme.txt < prev    next >
Encoding:
Text File  |  1993-02-05  |  77.6 KB  |  1,443 lines

  1. ===============================================================================
  2.                                 README.TXT
  3.                     For the dUFLP LIBRARY Files (attached)
  4.                (dUFLP = dBASE User's Function Library Project)
  5.                                Version 1.94
  6.                                  02/05/93
  7. ===============================================================================
  8. This library system is freeware (no charge). This file (README.TXT) is a small 
  9. amount of description for the attached procedure file. I have spent many hours 
  10. compiling functions and procedures that I have found useful. Some of these (a 
  11. few) are ones I have written myself, many are ones I have incorporated here
  12. from a variety of sources, usually the Borland (once Ashton-Tate) Bulletin
  13. Board (BORBBS). There were a lot of good people using this board, both as 
  14. sysops/sigops, and as users, and I have learned alot about dBASE IV Programming 
  15. from these people. 
  16.  
  17. This is my attempt at returning the favor. 
  18.  
  19. All procedures/functions in PROC and accompanying files are public domain. 
  20. I ask that if you use them (or in this PROC file) with your systems,
  21. that you include ALL the documentation, including (ESPECIALLY) the name of 
  22. the programmer (Credit should go where it's due, after all). 
  23.  
  24. SPECIAL THANKS: To Jay Parsons (CIS: 70160,340), who has done 1) a LOT of the 
  25. routines you will find here, and 2) a lot of work with me to ensure that
  26. there is integrity and consistency in this system.
  27.  
  28. Take a look wherever you download this for:
  29. dHUNG2.ZIP   -- a file containing the description of the dBASE User's Function
  30.                 Library Project standards (dUFLP) which are used in these 
  31.                 programs.
  32.  
  33. This is a set of dynamic files -- they're always changing. Please feel free to 
  34. send me comments and/or suggestions on ways to better it (which includes both 
  35. functions and procedures, and suggestions to make the ones here better). I can 
  36. be reached on Electronic Services: 
  37.  
  38. USSBBS: KenMayer  
  39. CompuServe: 71333,1030
  40.  
  41. or at home at:
  42.  
  43.    Ken Mayer
  44.    2308 Alva Avenue
  45.    El Cerrito, CA 94530
  46.    (510) 215-5879 (Home)
  47.  
  48. ==========
  49. DISCLAIMER
  50. ==========
  51. No guarantees are given. Last attempted, all these routines worked. I take no
  52. responsibility for their use, particularly if something happens to your data.
  53.  
  54. ========
  55. PROBLEMS
  56. ========
  57. Problems with individual procedures and functions should be addressed, if 
  58. possible, to the author (note the 'Programmer' listed in the first line of
  59. the internal documentation for each routine). If you cannot reach them, contact
  60. me at my id on the BBS, and I will see what I can do.
  61.  
  62. ============
  63. INSTRUCTIONS
  64. ============
  65. ---------------------------
  66. dBASE IV, version 1.5 users
  67. ---------------------------
  68. In order to use these, you need to understand (and this is brief) how dBASE IV,
  69. version 1.5 uses functions and libraries. Basically, it follows a 'search path'
  70. based on your programs and files, as well as its own internal functions.
  71. dBASE starts at the top of the following list, and if it cannot find the 
  72. function or procedure named in your program, it goes to the next item in the 
  73. list until it either finds it, or doesn't find it, as the case may be. If not,
  74. you will get the dBASE error message about not finding a function.
  75.  
  76. 1)  dBASE INTERNAL FUNCTIONS AND COMMANDS
  77. 2)  SYSPROC = "System Procedure Filename" (set in CONFIG.DB)
  78. 3)  Current Program (the one executing at that time)
  79. 4)  SET PROCEDURE TO <proc name>
  80. 5)  Calling Program (a main menu program, for example)
  81. 6)  SET LIBRARY TO <library name>
  82.  
  83. To use these files in dBASE IV, version 1.5, you should something along
  84. the following lines as a layout: 
  85.  
  86.    For any procedures/functions that are required specifically for your
  87.    system, and no other, place those in your own procedure file, and
  88.    refer to that in the SYSPROC command in your CONFIG.DB file. Example:
  89.  
  90.    SYSPROC = MYPROC
  91.  
  92.    To use the 'standard' library file for this system, in your main program 
  93.    (by 'main program' we could be discussing a MENU program, or other front-
  94.    end program) put the command:
  95.  
  96.    SET PROCEDURE TO PROC  && or point to the appropriate directory
  97.    
  98.    And in the appropriate programs, or where needed,
  99.  
  100.    SET LIBRARY TO <library file> && based on those below
  101.  
  102. This is just one method of handling this. One thing that can make life easier,
  103. if you switch LIBRARY files a lot, is the dBASE IV, 1.5 option to the SET
  104. command:  SET("LIBRARY"). This can be used in the following manner:
  105.  
  106.     cLibrary = set("LIBRARY")  && save current library name
  107.     set library to NEWLIB      && set new one
  108.     *-- do function/procedure calls from new library
  109.     set library to &cLibrary   && return to previous library file
  110.  
  111.      OR you could use the new function SwitchLib():
  112.  
  113.     cOldLib = switchlib("FILES")
  114.     *-- execute function/procedure
  115.     cOldLib = switchlib("&cOldLib")
  116.  
  117. SUGGESTION: If you store your copy of the LIBRARY files (and PROC) in another
  118. directory on the drive, you might want to define a public memvar called
  119. something like:  c_LibPath and store the path in in. This way you can
  120. use that with your routines to call the libraries. Something along the following
  121. could be useful:
  122.  
  123. PUBLIC c_LibPath
  124. Store "C:\DBFILES\PROC\" to c_LibPath
  125.   *-- processing
  126. cOldLib = SwitchLib("&c_LibPath.FILES")  && send with path, as well as filename
  127. *-- execute function/procedure
  128. cOldLib = SwitchLib("&cOldLib")          && should return path
  129.  
  130. This will make it easier to update if you are setting this up for a client --
  131. you can change the c_LibPath variable in the setup or menu program ONCE, and
  132. not have to worry about it again.
  133.  
  134. NOTE: that in some of the library files there are functions which require 
  135. the use of functions in OTHER files (i.e., some functions in NAVIGATE use 
  136. some functions that are in TRIG). I have attempted to ensure that I have copied
  137. INTO those library files the appropriate functions, so you don't spend too much
  138. time tearing your hair out.
  139.  
  140. -------------------
  141. dBASE IV, 1.1 Users
  142. -------------------
  143. To use these procedure files in their entirety, use the DOS Copy command to 
  144. concatenate the library files to the PROC file. Something along the following
  145. lines (although you should check to make sure you have all the files):
  146.  
  147. COPY PROC.PRG+SCREEN.PRG+COLOR.PRG+TRIG.PRG+CONVERT.PRG+ <etc.>
  148.  
  149. You should note that in some of the library files, there are duplicated 
  150. functions used, due to the fact that some users in 1.5 might wish to only use
  151. one or two of the library files. You can also use just the individual library
  152. files in your SET PROCEDURE command, if you wish. 
  153.  
  154. Add to your programs (a menu or startup routine is one of the best places) 
  155. the line:
  156.  
  157. SET PROCEDURE TO PROC
  158.  
  159. To use individual routines, rather than the whole library, extract them using 
  160. your favorite ASCII editor, or remove the routines from this file (you might 
  161. want to copy it first) that you do not feel you will need.
  162.  
  163. ================================================================================
  164. WHAT'S HERE?
  165. ================================================================================
  166.  
  167. Some of the places routines are placed may seem a bit arbitrary -- they are. 
  168. These decisions were made based on the functions/procedures I use the most in 
  169. my own routines. Since the original purpose of this library was my own use, 
  170. I felt it my prerogative to be the one to make the final decision as to what 
  171. routines were left in PROC.PRG, and which got moved to the LIBRARY files. 
  172.  
  173. Included in this LIBRARY System are the following files:
  174.  
  175. Text Files
  176. README.TXT   -- You're looking at it.
  177. WHATS.NEW    -- This is a description of the new features for this system.
  178. CONTRIB.TXT  -- How to contribute to the Library Project.
  179. JPMOUSE.TXT  -- An explanation from Jay on the JPMOUSE.BIN file, attached
  180.                 (with his permission). See also the function ISMOUSE() and
  181.                 procedure file SETMOUSE in PROC.PRG.
  182. DISK.TXT     -- A very brief discussion on the use of DISK.BIN.
  183. SEARCH.TXT   -- A very brief discussion on the use of SEARCH.BIN.
  184. USERID.TXT   -- A very brief discussion on the use of USERID.BIN.
  185. PRINTSCR.TXT -- Discussion on the use of PRINTSCR.BIN.
  186. SCREEN.TXT   -- Discussion on the use of SCREEN.BIN.
  187. VDCURSOR.TXT -- A very brief discussion on the use of VDCURSOR.BIN.
  188.  
  189. Procedure and Library Files -- Described Below
  190. ARRAY.PRG
  191. COLOR.PRG
  192. CONVERT.PRG
  193. DATES.PRG
  194. ERRLOG.PRG
  195. FIELDS.PRG
  196. FILES.PRG
  197. FINANCE.PRG
  198. FRPG.PRG
  199. HELPROC.PRG
  200. LISTFILE.PRG
  201. MEASURE.PRG
  202. MISC.PRG
  203. NAVIGATE.PRG
  204. OBSOLETE.PRG
  205. PICKLIST.PRG
  206. PROC.PRG
  207. SCA.PRG
  208. SCREEN.PRG
  209. STATS.PRG
  210. STRINGS.PRG
  211. TIME.PRG
  212. TRIG.PRG
  213. WINDOWS.PRG
  214.  
  215. BIN Files -- used in routines attached.
  216. JPMOUSE.BIN
  217. DISK.BIN
  218. PRINTSCR.BIN
  219. SCREEN.BIN
  220. SEARCH.BIN
  221. USERID.BIN
  222. OX.SYS
  223. VDCURSOR.BIN
  224.  
  225. DBF Files -- used in routines attached.
  226. HELPER.DBF
  227.  
  228. OTHER Files -- used in routines attached.
  229. HELPER.FMT
  230.  
  231. Below is a quick list of all the procedures and functions included in the 
  232. library files in the sequence they are presented in the programs themselves:
  233.  
  234. ===================================
  235. PROC.PRG -- The MAIN PROCEDURE File
  236. ===================================
  237.  
  238. ----------------------------------
  239. MESSAGE/SCREEN PROCESSING ROUTINES
  240. ----------------------------------
  241. PrintErr    -- used to display a "standard" error message for printer 
  242.                errors (is it on, online, out of paper?).
  243.                Usage: do PrintErr
  244. Open_Screen -- Used to add texture to the background for an opening screen or
  245.                menu.
  246.                Usage: do Open_Screen
  247. JazClear    -- performs a nice center to edge of screen clear (using a box) ...
  248.                Usage: do JazClear
  249. Wipe        -- performs a left-to-right wipe of a window. Nice effect.
  250.                Usage: do Wipe with <nULRow>,<nULCol>,<nBRRow>,<nBRCol>
  251. Center      -- used to center text anywhere on the screen (optional colors).
  252.                Usage: do Center with <nRow>,<nWidth>,"<cColors>","<cText>"
  253. Surround()  -- Used to display text at X,Y position, surrounded with a double-
  254.                line box.
  255.                Usage: Surround(<nRow>,<nCol>,"<cColor>","<cText>")
  256. Message1()  -- Displays a single-line message, waits for user to press a key
  257.                before program moves on.
  258.                Usage: Message1(<nRow>,<nWidth>,"<cColor>","<cText>")
  259. Message2()  -- Same as above, but displays message in a window (with shadow).
  260.                Usage: Message2("<cText>","<cColor>")
  261. Message3()  -- Same as above, but will handle LONG messages, wrapping inside
  262.                window.
  263.                Usage: Message3("<cText>","<cColor>")
  264. Message4()  -- 2-Line message in a window, pauses for user.
  265.                Usage: Message4("<cText1>","<cText2>","<cColor>")
  266. ProgBar     -- Monitor program activity, so user does not get worried that
  267.                the machine went into limbo. A graphic version of what the
  268.                "MONITOR" procedure in PROC.PRG does.
  269.                Usage: Do ProgBar with <nQuan>,"<cWindCol>","<cFillCol1>",;
  270.                                  "<cFillCol2>","<cMessage>",<nWindWidth>
  271. ScrnHead()  -- Used to display a screen header inside a box (with a shadow).
  272.                Usage: ScrnHead("<cColor>","<cText>")
  273. YesNo()     -- Used to ask a "yes/no" type question, allows three lines of 
  274.                message, and uses menu pads to choose (move cursor, press 
  275.                <enter>).
  276.                Usage: YesNo(<lAnswer>,"<cMess1>","<cMess2>","<cMess3>",;
  277.                              "<cColors>")
  278. YesNo2()    -- As above, but allows programmer to choose position on screen.
  279.                Usage: YesNo2(<lAnswer>,"<cWhere>","<cMess1>","<cMess2>",;
  280.                            "<cMess3>","<cColors>")
  281.                    where cWhere may be one of the following:
  282.                          UL = Upper Left
  283.                          UC = Upper Center
  284.                          UR = Upper Right
  285.                          CL = Center Left
  286.                          CC = Center Center
  287.                          CR = Center Right
  288.                          BL = Bottom Left
  289.                          BC = Bottom Center
  290.                          BR = Bottom Right
  291.                    Anything else will default to CC.
  292. ErrorMsg()  -- Allows 2 lines of message, first is ** ERROR **, or optionally,
  293.                ** ERROR # **  where '#' is a number (if "<cErr>" is empty,
  294.                (""), system uses first option, but there must be SOMETHING
  295.                there). 
  296.                Usage: ErrorMsg("<cErr>","<cMess1>","<cMess2>","<cColors>")
  297. Alert2()    -- Brings up an "Alert" dialog box (similar to Windows).
  298.                Usage: Alert2("<cTitle>","<cMessage>","<cColor>"[,"<cBorder>"])
  299. Shadow      -- Used for windows/boxes to display a shadow, giving 3-D effect.
  300.                Usage: do Shadow with <nULRow>,<nULCol>,<nBRRow>,<nBRCol>
  301. VPick()     -- Multiple-item Picklist -- this routine will allow you to create
  302.                a simple vertical picklist of items, returning the first letter 
  303.                of the option selected, or a null string if the user pressed 
  304.                <Esc>.
  305.                Usage: VPick(<nRow>,<nCol>,"<~Option1~Option2~Option3>",;
  306.                              "<cTitle>","<cMessage>",<lShadow>,<cColor>)
  307. HPick()     -- Very much like VPICK() above, but does a Horizontal Picklist.
  308.                Usage: HPick(<nRow>,<nCol>,"<~Option1~Option2~Option3>",;
  309.                              "<cTitle>","<cMessage>",<lShadow>,<cColor>)
  310.  
  311. -------------------------
  312. COLOR PROCESSING ROUTINES
  313. -------------------------
  314. SetColor    -- Sets colors to contents of a memvar to handle various parts of
  315.                the screen. THIS IS A NEW ROUTINE -- USERS OF THE OLD 
  316.                SETCOLOR and SETCOLOR2 ROUTINES SHOULD CHECK "OBSOLETE.PRG".
  317.                Usage: do SetColor with <cColorVar>
  318. ReColor     -- Restores colors to those held in a string of the form returned
  319.                by SET("ATTRIBUTE").
  320.                Usage: Do ReColor with <cColors>
  321. ColorBrk()  -- Returns one of three portions of a color variable as used in
  322.                many of my own routines (YESNO, etc.). Used for explicitly
  323.                setting colors.
  324.                Usage: ColorBrk(<cColorVar>,<nField>)
  325. FBClrBrk()  -- Returns either the foreground or the background (FB) of a
  326.                color memory variable or string.
  327.                Usage: FBClrBrk(<cColorVar>,<cType>)
  328.  
  329. ----------------------------
  330. STRING MANIPULATION ROUTINES
  331. ----------------------------
  332. AllTrim()   -- Trims both sides of a character field/memvar.
  333.                Usage: AllTrim(<cString>)
  334. Justify()   -- This is copied here for use in other routines from STRINGS.PRG.
  335. State()     -- This is used for validation of a STATE (two letter) code ... 
  336.                (returns .t. or .f.) -- useful for data entry.
  337.                Usage: State(<cState>)
  338.  
  339. ----------------------
  340. DATE HANDLING ROUTINES
  341. ----------------------
  342. DateText()  -- Convert date to Month Day, Year format.
  343.                Usage: DateText(<dDate>)
  344. DateText2() -- As above, adds day of week (DoW, Month Day, Year).
  345.                Usage: DateText2(<dDate>)
  346. Age()       -- Returns the age of someone as of DATE(), given their birthdate.
  347.                Usage: Age(<dDate>)
  348.  
  349. -----------------------
  350. FIELD HANDLING ROUTINES
  351. -----------------------
  352. IsUnique()  -- Used to check a keyfield in a database to see if it's unique.
  353.                Usage: IsUnique(<xValue>,<cOrder>)
  354.  
  355. --------------
  356. MISC. ROUTINES
  357. --------------
  358. SetPrint    -- Used to setup the printer memory variables for a print job.
  359.                Usage: do SetPrint
  360. DosRun()    -- Used to execute a DOS command/program from inside dBASE, handles
  361.                windows and such by restoring them when done.
  362.                Usage: DosRun(<cCmd>)
  363. ScrnRpt()   -- Shows a dBASE Report on screen, and pauses when the screen is
  364.                full.
  365.                Usage: ScrnRpt(<cRpt>)
  366. SwitchLib() -- Changes the current library file to another. Useful when doing
  367.                quick changes to execute a function/file in another library.
  368.                Usage: SwitchLib(<cNewLib>)
  369. IsMouse()   -- Looks at system for a mouse driver, if there, it turns off
  370.                the mouse. Uses JPMOUSE.BIN.
  371.                Usage: IsMouse()
  372. SetMouse    -- Used to toggle a mouse, requires JPMOUSE.BIN and a public
  373.                memvar c_Mouse set to the most current state ("OFF" means
  374.                the mouse is "OFF" ... and will be toggled ON in the next
  375.                call to SetMouse).
  376.                Usage: On Key label ... DO SetMouse
  377. VerLevel()  -- Used to return numeric value of current version of dBASE or
  378.                RUNTIME. Useful with those version specific routines.
  379.                Usage: VerLevel()
  380.  
  381. =============
  382. LIBRARY FILES
  383. =============
  384.  
  385. The following files are the 'library' files that contain all routines in this
  386. system not contained in PROC.PRG. See the section of this document marked
  387. 'INSTRUCTIONS' for how to use these. Please notice that some functions which
  388. are used in specific LIBRARY files (such as NAVIGATE.PRG, which uses some of
  389. the functions in TRIG.PRG) are duplicated in some of the other library files.
  390. This was done to make life easier on the programmer. Since dBASE IV, 1.5 does
  391. not allow multiple library files (although one can hope for such a feature in
  392. future editions), we are stuck having to duplicate some routines.
  393.  
  394. --------------------------------------------------------------------------------
  395. SCREEN.PRG -- Screen Handling
  396. --------------------------------------------------------------------------------
  397. Radio()     -- This routine creates a "radio-button" routine. You can have
  398.                up to four options. Returns # of item chosen ...
  399.                Usage: Radio(<nULRow>,<nULCol>,<nChoice>,"<cTxt1>","<cTxt2>",;
  400.                              "<cTxt3>","<cTxt4>","<cTitle>","<cColor>")
  401. CheckBox    -- This routine does a "CheckBox" much like Windows/Mac type
  402.                software, with up to four options. NOTE -- the items marked
  403.                in the format must be a) logical, and b) fields/memvars.
  404.                They cannot be literal values, due to limitations of dBASE
  405.                parameter handling.
  406.                Usage: Do CheckBox with <nULRow>,<nULCol>,<lChk1>,<lChk2>,;
  407.                                         <lChk3>,<lChk4>,"<cTxt1>",;
  408.                                         "<cTxt2>","<cTxt3>","<cTxt4>",;
  409.                                         "<cTxt0>","<cColor>"
  410. MenuPad()   -- Used to define menu pad and popup bars as a specific length.
  411.                Function will truncate if longer than needed, and will
  412.                pad with spaces otherwise.
  413.                Usage: MenuPad("<nChoice>",<nLength>)
  414. Banner()    -- Used to display a scrolling "banner" message on the screen.
  415.                Usage: Banner(<nRow>,<nCol>,<nwidth>,"<cMessage>","<cColor>")
  416. SeeMatch()  -- Displays instant lookup match on a field in a shadowed box.
  417.                Usage: SeeMatch("<cFile>",<cSeekExp>,"<cReturn>",<nULRow>,;
  418.                                <nULCol>,<nBRRow>,<nBRCol>,"<cColor>")
  419. MsgExp()    -- Used to display a message (or an error message), centered on
  420.                the screen. Does not use the "(Press Space)" bits that dBASE
  421.                uses on an error message ... The message and the line on which
  422.                it is displayed will be the same color.
  423.                Usage: MsgExp("<cExp>")
  424. Dialog()    -- Routine to provide a 'standard' set of dialog boxes and buttons
  425.                for all applications. 
  426.                Usage: Dialog("<cMsg>",<nType>,"<cBorder>",<nDefBut>,<lShadow>,;
  427.                              "<cWind>","<cButton>")
  428.                nType is used to describe the dialog box type, options are:
  429.                0:      'OK'
  430.                1: 'OK' 'CANCEL'
  431.                2: 'ABORT'  'RETRY'  'IGNORE'
  432.                3: 'YES'  'NO'   'CANCEL'
  433.                4: 'YES'  'NO'
  434.                5: 'RETRY'   'CANCEL'
  435. YesNoCan()  -- A dialog box, defaults to 'Yes/No/Cancel', varies in size,
  436.                depending on programmer needs, optional row position. Nice
  437.                modification of the YESNO() function in PROC.PRG.
  438.                Usage: YesNoCan("<cAnswer>","<cMess1>","<cMess2>","<cMess3>",;
  439.                                "<cPrompt1>","<cPrompt2>","<cPrompt3>",;
  440.                                <nTopRow>,"<cColor>"[,<lConfirm>])
  441. ProgBar2    -- Same as PROGBAR in PROC.PRG, but a bit simpler to use.
  442.                Usage: Do ProgBar2 with <nQuan>,"<cWindCol>","<cFillCol2>",;
  443.                                  "<cFillCol2>"
  444. MovePad     -- Moves menu pad on selection of a letter. 
  445.                Usage: Do MenuPad with <cLetter>,<lSelect>,<cChoices>
  446. Monitor     -- Displays a box, showing total records in database -- is designed
  447.                to be used in a system that does a record-by-record update, 
  448.                so the user knows something is happening. You need to add code
  449.                to display actual record numbers as the task is happening.
  450.                Usage: do Monitor with "<cText>","<cColors>"
  451. Monitoroff  -- Cleanup for Monitor procedure above.
  452.                Usage: do MonitorOff
  453. NewBorder() -- This can be used to change your current border setting to
  454.                one of a set of pre-defined borders. It will also set a
  455.                public memvar c_Border to the same border setup string, and
  456.                returns the 'current' border string.
  457.                Usage: NewBorder("<cStyle>")
  458. VidRow()    -- Returns the absolute row coordinate on a screen, ignoring
  459.                active windows (which can be frustrating at times).
  460.                REQUIRES: VDCURSOR.BIN
  461.                Usage: VidRow()
  462. VidCol()    -- Returns the absolute column coordinate on a screen, ignoring
  463.                active windows ...
  464.                REQUIRES: VDCURSOR.BIN
  465.                Usage: VidCol()
  466. PwdMask()   -- Used to obtain a password from a user, with a programmer 
  467.                defineable mask character (default is asterisk). REQUIRES 
  468.                VDCURSOR.BIN
  469.                Usage: PwdMask(<cField>[,<nMaskChar>])
  470.  
  471. --------------------------------------------------------------------------------
  472. COLOR.PRG -- Color Processing
  473. --------------------------------------------------------------------------------
  474. AttriByte() -- Returns the attribute byte of a dBASE Color code.
  475.                Usage: AttriByte("<cCode>")
  476. ColorName() -- Converts an attribute value for an area to the name of the
  477.                corresponding color combination. 
  478.                Usage: ColorName(<nAttr>)
  479. ColorCode() -- Given a color attribute byte, returns dBASE color code.
  480.                Usage: ColorCode(<nAttr>)
  481. ColorOf()   -- Returns the color of attributes in dBASE, as currently set.
  482.                Usage: ColorOf("<cArea>")
  483.  
  484. --------------------------------------------------------------------------------
  485. STRINGS.PRG -- Character String Processing
  486. --------------------------------------------------------------------------------
  487. Proper()    -- Converts text to "proper" case (upper/lower case, handles
  488.                contractions, Mc, Mac, etc.). Useful for names (converts first
  489.                letter to upper case, the rest to lower, except as above).
  490.                Usage: Proper("<cArg>")
  491. Justify()   -- Used to justify a field or memvar (or character expression) 
  492.                within a specific field width. 
  493.                Usage: Justify(<cFld>,<nLength>,"<cType>")
  494.                    cType must be L (left), C (center), or R (right)
  495. Dots()      -- Used to pad a field with dots (dot leader, trailer ...) 
  496.                Usage: Dots(<cFld>,<nLength>,"<cType>")
  497.                    cType must be L (left), C (center), or R (right)
  498. CutPaste()  -- Used to Cut a string and Paste another in it's place. It's
  499.                an easier way to use the STUFF() function.
  500.                Usage: CutPaste(<cFld>,<cLookFor>,<cRepWith>)
  501. LastWord()  -- Used to return the last "word" of a string of characters (words
  502.                being bracketed by spaces).
  503.                Usage: LastWord(<cString>)
  504. VStretch()  -- Displays a long character field (254 char) on screen, with
  505.                wrap-around, and handles proper word-breaks - you give
  506.                dimensions for where you want it displayed (window).
  507.                Usage: VStretch(<cFld>,<nULRow>,<nULCol>,<nBRRow>,<nBRCol>)
  508. AtCount()   -- Returns the number of times a string is found in another.
  509.                Usage: AtCount(<cFindStr>,<cBigStr>)
  510. IsAlNum()   -- If first character of string is alphabetic or digit, returns
  511.                .t., otherwise returns .f..
  512.                Usage: IsAlNum(<cChar>)
  513. IsAscii()   -- If first character is in ASCII (normal, not extended) character
  514.                set, returns .t., otherwise returns .f..
  515.                Usage: IsAscii(<cChar>)
  516. IsCntrl()   -- If first character is a delete or control character, returns
  517.                .t., otherwise returns .f..
  518.                Usage: IsCntrl(<cChar>)
  519. IsDigit()   -- If first character is a digit, returns .t..
  520.                Usage: IsDigit(<cChar>)
  521. IsPrint()   -- If first character is a printing character (space through
  522.                chr(126), returns .t..
  523.                Usage: IsPrint(<cChar>)
  524. IsXDigit()  -- If first character is possible hexadecimal digit, returns .t..
  525.                Usage: IsXDigit(<cChar>)
  526. IsSpace()   -- Returns .t. if first character is space, tab, carriage return,
  527.                line feed, vertical tab, or formfeed.
  528.                Usage: IsSpace(<cChar>)
  529. Name2Label()-- Returns a name held in five fields as a single field for the
  530.                purpose of printing in a label.
  531.                Usage: Name2Label(<nLength>,<cPrefix>,<cFirstName>,;
  532.                                   <cMidName>,<cLastName>,<cSuffix>)
  533. StrpBrk()   -- Search string for first occurrence of any specific character(s).
  534.                Usage: StrpBrk(<cCharSet>,<cBigStr>)
  535. RAt()       -- Reverse AT() - returns position of a character string in its  
  536.                last position in a larger string ...
  537.                Usage: RAt(<cFindStr>,<cBigStr>)
  538. StrRev()    -- Reverse a string.
  539.                Usage: StrRev(<cAnyStr>)
  540. Strip2Val() -- Strip characters from the left until reaching one that might
  541.                begin a numeric value ...
  542.                Usage: Strip2Val(<cString>)
  543. StripVal()  -- Strip characters until reaching one that is NOT part of a
  544.                number.
  545.                Usage: StripVal(<cString>)
  546. ParseWord() -- Finds first word in a character string.
  547.                Usage: ParseWord(<cW>)
  548. StripWord() -- Removes first word in character string.
  549.                Usage: StripWord(<cW>)
  550. Plural()    -- Returns the "plural" of a noun. This will fit most cases, but not
  551.                all, as English has too many exceptions. 
  552.                Usage: Plural(<nItems>,"<cNoun>")
  553. StrComp()   -- Compares the contents of two strings.
  554.                Usage: StrComp(<cStr1>,<cStr2>)
  555. StrOccur()  -- Calculates the number of occurences of a string in another,
  556.                works for character memvar/field, and memo fields.
  557.                Usage: StrOccur(<cInString>,<cFindString>)
  558. NumOccur()  -- Calculates the number of occurences of a string in another.
  559.                Usage: NumOccur(<cInString>,<cFindString>)
  560. ReplMemo()  -- Globally searches and replaces a string with another string
  561.                in a character field/memvar or memo field.
  562.                Usage: ReplMemo(<cSource>,<cCurrStr>,<cNewStr>)
  563. MemStuff()  -- Replaces a specific string in a character string, by another.
  564.                Returns the resultant string.
  565.                Usage: MemStuff(<cSource>,<cCurrStr>,<cNewStr>)
  566. Stub()      -- Returns a specific number of characters from a given string, 
  567.                adding characters in cIn to the end of it.
  568.                Usage: Stub(<cString>,<nIn>,<cIn>)
  569. FirstMem()  -- Capitalizes the first character of all the words in the string
  570.                passed as a parameter, returns resultant string (unless a memo,
  571.                in which case, returns a .T.)
  572.                Usage: FirstMem(<cInStr>)
  573. FirstCap()  -- Capitalizes the first character of a string.
  574.                Usage: FirstCap(<cInString>)
  575. StripND()   -- Strips non-digit characters from a character string, returning
  576.                a string containing only digits.
  577.                Usage: StripND(<cNumArg>)
  578. Strip()     -- Strips specific character(s) from a character string.
  579.                Usage: Strip(<cVar>,<cArg>)
  580. WordWrap    -- A routine to handle wrapping text within a specified width.
  581.                Usage: do WordWrap with <nRow>,<nCol>,<cText>,<nWidth>
  582.  
  583. --------------------------------------------------------------------------------
  584. CONVERT.PRG -- Numeric Conversions/calculations
  585. --------------------------------------------------------------------------------
  586. Roman()     -- Function to return a Roman Numeral based on input of an Arabic.
  587.                Usage: Roman(<nArabic>)
  588. Arabic()    -- Opposite of Roman (takes Roman Numeral provided, returns
  589.                Arabic).
  590.                Usage: Arabic("<cRoman>")
  591. Factorial() -- Does what it sounds like, it returns the factorial of a value.
  592.                Usage: Factorial(<nNumber>)
  593. IsPrime()   -- Determines if the argument passed is a prime positive integer.
  594.                Usage: IsPrime(<nNumber>)
  595. BankRound() -- Rounds numeric argument to given # of places using "Banker's 
  596.                rule."
  597.                Usage: BankRound(<nNumber>,<nPlaces>)
  598. Num2Str()   -- Number to String, uses ASCII 1/2 and 1/4 instead of decimals
  599.                where appropriate.
  600.                Usage: Num2Str(<nNumber>)
  601. Dec2Hex()   -- Decimal to Hexadecimal conversion.
  602.                Usage: Dec2Hex(<nDecimal>)
  603. Hex2Dec()   -- Hexadecimal to Decimal conversion.
  604.                Usage: Hex2Dec(<cHex>)
  605. Hex2Bin()   -- Hexadecimal to Binary conversion.
  606.                Usage: Hex2Bin(<cHex>)
  607. Bin2Hex()   -- Binary to Hexadecimal conversion.
  608.                Usage: Bin2Hex(<cBin>)
  609. Dec2Oct()   -- Decimal to Octal conversion.
  610.                Usage: Dec2Oct(<nDec>)
  611. Oct2Dec()   -- Octal to Decimal conversion.
  612.                Usage: Oct2Dec(<xOct>)
  613. Cash2Check()-- Converts a number of dollars and cents to a string of words.
  614.                Usage: Cash2Check(<nCash>)
  615. Num2Words() -- Converts an integer to a string of words.
  616.                Usage: Num2Words(<nNum>)
  617. Thou2Words()-- Converts a positive integer less than 1000 to a string of words.
  618.                Usage: Thou2Words(<nNum>)
  619. Ord()       -- Converts an integer to ordinal representation.
  620.                Usage: Ord(<nNum>)
  621. Num2Word()  -- Converts an integer to a string of words -- self-contained
  622.                function, does not call other functions. 
  623.                Usage: Num2Word(<nValue>)
  624. Num2Real()  -- Converts a number to the ASCII representation of its storage in
  625.                IEEE 8-byte real format.
  626.                Usage: Num2Real(<nNum>,<nExp>)
  627. Dec2Bin()   -- Decimal to Binary conversion.
  628.                Usage: Dec2Bin(<nNum>,<nPlaces>)
  629. Frac2Bin()  -- Converts the fractional part of a decimal number to a
  630.                character string giving its ASCII binary representation.
  631.                Usage: Frac2Bin(<nNum>,<nPlaces>)
  632. Bin2Dec()   -- Converts a string containing a binary value to its numeric 
  633.                (decimal) equivalent.
  634.                Usage: Bin2Dec(<cStr>)
  635. Dec2Mkd()   -- Decimal to echit chr() values in array. (Roughly equivalent to 
  636.                MDK$() in BASIC)
  637.                Usage: Dec2Mkd(<nVar>,<cName>)
  638. Dec2Mki()   -- Converts an integer in range -32,768 to +32,767 to two chr() 
  639.                values equivalent to the two bytes created by the BASIC MKI$().
  640.                Usage: Dec2Mki(<nInt>,<cName>)
  641. Dec2Mkl()   -- Converts integer to four chr() values in array. Equivalent to 
  642.                MKL$() in BASIC.
  643.                Usage: Dec2Mkl(<nInt>,<cName>)
  644. Dec2Mks()   -- Converts numeric value to four chr() values in array. Equivalent 
  645.                to MKS$() in BASIC.
  646.                Usage: Dec2Mks(<nVar>,<cName>)
  647. Dec2MSks()  -- Convert numeric to four CHR() values in array. Uses obsolete
  648.                MicroSoft format. 
  649.                Usage: Dec2MSks(<nVar>,<cName>)
  650. Mkd2Dec()   -- Convert eight bytes storing an IEEE long real value (similar to
  651.                CVD() function in BASIC)
  652.                Usage: Mkd2Dec(<c1>,...,<c8>)
  653. Mki2Dec()   -- Convert two bytes storing a signed short integer to decimal
  654.                equivalent. Similar to CVI() in BASIC.
  655.                Usage: Mki2Dec(<c1>,<c2>)
  656. Mkl2Dec()   -- Convert four bytes storing a signed long integer. Similar to 
  657.                CVL() in BASIC.
  658.                Usage: Mkl2Dec(<c1>,<c2>,<c3>,<c4>)
  659. Mks2Dec()   -- Converts four bytes storing an IEEE Short real value. Similar to
  660.                CVS() in BASIC.
  661.                Usage: Mks2Dec(<c1>,<c2>,<c3>,<c4>)
  662. MSks2Dec()  -- Converts four bytes storing an old-style Microsoft short real
  663.                value to decimal. Similar to CVS() in BASIC.
  664.                Usage: MSks2Dec(<c1>,<c2>,<c3>,<c4>)
  665. Ordinal()   -- Returns an ordinal string for a positive integer < 100. For
  666.                values greater than this, use Num2Words(), and use this for
  667.                the values < 100.
  668.                Usage: Ordinal(<nNum>)
  669.  
  670. --------------------------------------------------------------------------------
  671. DATES.PRG -- Date Handling Routines
  672. --------------------------------------------------------------------------------
  673. DateText3() -- As DateText() and DateText2() in PROC.PRG, returns: Month, Year.
  674.                Usage: DateText3(<dDate>)
  675. Age2()      -- Returns age of someone on the date of a specific event.
  676.                Usage: Age2(<dDate>,<dEvent>)
  677. Annivrsry() -- Checks to see if a birthday or other specific "anniversary" is 
  678.                within a range of dates.
  679.                Usage: Annivrsry(<dTest>,<dBegin>,<dEnd>)
  680. AddMonths() -- Returns the exact date 'N' months from give date.
  681.                Usage: AddMonths(<dDate>,<nMonths>)
  682. AddYears()  -- Returns the exact date 'N' Years from given date.
  683.                Usage: AddYears(<dDate>,<nYears>)
  684. IsLeap()    -- Returns .t./.f. if year is a leap year... (year in YY or YYYY
  685.                formats)
  686.                Usage: IsLeap(<nYear>)
  687. DoY()       -- Day of Year -- returns "Julian" date (US Government version ...)
  688.                -- this is the number of days a date is from January 1 of that
  689.                year (i.e., 11/14/91 = 318).
  690.                Usage: DoY(<dDate>)
  691. WeekNo()    -- Returns the week number of the date (there are 52 weeks a year,
  692.                right?). 
  693.                Usage: WeekNo(<dDate>)
  694. Holiday()   -- Returns the date of specific "floating" holidays for a given
  695.                year, requires a one-letter code. See full doc in DATES.PRG.
  696.                Usage: Holiday(<nYear>,<cCode>)
  697.                Where cCode may be one of the following:
  698.                      P = President's Day
  699.                      D = Daylight Saving Time
  700.                      M = Memorial Day
  701.                      L = Labor Day
  702.                      C = Columbus Day
  703.                      S = Return to "Standard" Time
  704.                      E = Election Day
  705.                      T = Thanksgiving Day
  706.                      A = Advent 1st Sunday
  707. EasterDay() -- This returns the day of Easter. It doesn't work as easily as
  708.                those dates given above, so has it's own function.
  709.                Usage: EasterDay(<nYear>) && nYear = YYYY format
  710. nDoW()      -- Numeric Day of Week -- used to return the numeric value of a 
  711.                character day of the week, useful for some of the revised
  712.                functions below.
  713.                Usage: nDoW(<cDay>)
  714. FWDoM()     -- First Working Day Of the Month -- this returns the first working
  715.                day of the month passed to the function.
  716.                Usage: FWDoM(<dDate>)
  717. LWDoM()     -- Last Working Day Of the Month --  returns the last working day
  718.                of the month passed to the function.
  719.                Usage: LWDoM(<dDate>)
  720. FDoD()      -- First Day of Date -- this returns the first occurrence of a given
  721.                day of the week within a month. For example, you might need the
  722.                first Monday of the month. 
  723.                Usage: FDoD(<dDate>,"<cDay>")  (cDay = Monday, Tuesday, etc.)
  724. LDoD()      -- Last Day of Date -- This returns the last occurrence of a given
  725.                day of the week within a month. For example, you might need the 
  726.                last Monday in a month.
  727.                Usage: LDoD(<dDate>,"<cDay>")
  728. LDoM()      -- Last Day of Month -- this returns the last day of the month
  729.                as a date. It's used in LDoD and LWDoM above.
  730.                Usage: LDoM(<dDate>)
  731. NumDoD()    -- Number of Day of Date -- this returns a specific occurrence of a
  732.                given day of the week within a month. For example, you might need
  733.                the 3rd Tuesday of the month.
  734.                Usage: NumDoD(<dDate>,<nDay>,"<cDay>")
  735. WDIF()      -- Work Days In the Future -- this is used to return the date based
  736.                on a number of work-days from another date. For example, you 
  737.                could find the date of the 10th work date from today (date())
  738.                by using date(),10 as the parameters in the format below. This
  739.                function can use a HOLIDAYS database to be more accurate, but
  740.                you must create it in a specific format (see complete function 
  741.                documentation in the file DATES.PRG).
  742.                Usage: WDiF(<dStart>,nWDays)
  743. StoD()      -- String to Date -- this returns a "normal" dBASE date from a
  744.                character string containing formats of YYYYMMDD or YYMMDD.
  745.                Usage: StoD("<cString>")
  746. Quarter()   -- This function returns the "Quarter" of the year that a specified
  747.                date is in ...
  748.                Usage: Quarter(<dDate>)
  749. Dat2Jul()   -- Convert dBASE date to Julian date
  750.                Usage: Dat2Jul(<dDate>)
  751. Jul2Dat()   -- Convert Julian date to dBASE date
  752.                Usage: Jul2Dat(<nJulian>)
  753. FrstNxtMth()-- Returns the first day of next month, given a date in 'current'
  754.                month.
  755.                Usage: FrstNxtMth(<dDate>)
  756. FDoM()      -- Returns the first day of the month a specific date is in.
  757.                Usage: FDoM(<dArg>)
  758. FDoY()      -- Returns first day of year (January 1) that a specific date is in.
  759.                Usage: FDoY(<dArg>)
  760. LDoY()      -- Returns last day of year (December 31) that a specific date is
  761.                in. 
  762.                Usage: LDoY(<dArg>)
  763. QDate()     -- Allows user to enter date as if using Intuit's Quicken. Used
  764.                with WHEN clause ...
  765.                Usage: @x,y GET <dArg> WHEN QDate(<dArg>)
  766.  
  767. --------------------------------------------------------------------------------
  768. TIME.PRG Time Processing Routines
  769. --------------------------------------------------------------------------------
  770. Delay()     -- Delay loop in seconds.
  771.                Usage: Delay(<nSeconds>)
  772. Time2Sec()  -- Convert time string to seconds.
  773.                Usage: Time2Sec(<cTime>)
  774. Sec2Time()  -- Convert seconds to time string.
  775.                Usage: Sec2Time(<nSeconds>)
  776. DiffTime()  -- Calculate difference btween two time strings.
  777.                Usage: DiffTime(<cTime1>,<cTime2>)
  778. Civ2Mil()   -- Convert civilian time string (i.e., "12:59 A.M.") to 24 hour
  779.                (military) time.
  780.                Usage: Civ2Mil(<cCivilTime>)
  781. Mil2Civ()   -- Convert military (24 hour) time to Civilian time.
  782.                Usage: Mil2Civ(<cMilTime>)
  783. IsAmPm()    -- Checks to see if a time string is in "Civilian" time format 
  784.                (i.e., AM/PM) -- returns a logical (.t./.f.)
  785.                Usage: IsAmPm(<cTime>)
  786.    
  787. --------------------------------------------------------------------------------
  788. FINANCE.PRG -- Finance Functions
  789. --------------------------------------------------------------------------------
  790. Discount()  -- Compute the present value of an amount received at the end of
  791.                a number of periods given a periodic interest rate.
  792.                Usage: Discount(<nFuturVal>,<nRate>,<nPeriods>)
  793. FuturVal()  -- Compute the future value of an initial amount at compound
  794.                interest received at a given periodic rate for a number of 
  795.                periods.
  796.                Usage: FuturVal(<nPresVal>,<nRate>,<nPeriods>)
  797. Rate()      -- Compute rate of periodic interest needed to produce a future
  798.                value from a present value in a given number of periods.
  799.                Usage: Rate(<nFutVal>,<nPresVal>,<nPeriods>)
  800. ContRate()  -- Compute rate if compounding is continuous.
  801.                Usage: ContRate(<nFutVal>,<nPresVal>,<nYears>)
  802. NPV()       -- Net Present Value of array aCashFlow[n].
  803.                Usage: NPV(<nRate>,<nPeriods>)
  804. IRR()       -- Internal Rate of Return, using ZeroIn().
  805.                Usage: Irr(<fX1>,<fX2>,<n_Flag>)
  806. IRR2()      -- Internal Rate of Return, traditional analysis of periodic
  807.                cashflows. Returns periodic rate of return which must be analyzed
  808.                by the user. Uses an iterative process and multiple answers
  809.                are possible.
  810.                Usage: Irr2(<nN>,<cFlow>,<lSw>,<nGuess>)
  811. FVIrr()     -- Companion to Irr2(). Irr() searches the function for NPV for 
  812.                roots, while FVIrr searches the function for NFV.
  813.                Usage: FVIrr(<nN>,<cFlow>,<lSw>,<nGuess>)
  814. MIrr()      -- Modified Internal Rate of Return -- employs a financial manager's
  815.                analysis of the cost of reserve funds and a likely reinvestment 
  816.                rate for receipts. Returns periodic rate of return which must
  817.                be annualized by the user. Solves directly for a unique answer.
  818.                Usage: MIrr(<nN>,<cFlow>,<nRRate>,<nFRate>)
  819. XIrr()      -- Internal Rate of Return not constrained by evenly-spaced
  820.                periods of chasflow, but uses dates of transactions. Returns
  821.                annulaized rate of return based on daily compounded interest.
  822.                Iterative process with multiple answers possible.
  823.                Usage: XIrr(<nN>,<cFlow>,<lSw>,<nGuess>)
  824. FVXIrr()    -- Companion to XIrr() with the search for roots of the NFV 
  825.                function. See FVIrr() above.
  826.                Usage: FVXIrr(<nN>,<cFlow>,<lSw>,<nGuess>)
  827. XMIrr()     -- Modified Internal Rate of Return without the constraint of
  828.                evenly spaced periods, uses dates of transactions and returns
  829.                annualized rate of return based on daily compounded interest.
  830.                Solves directly for a unique answer.
  831.                Usage: XMIrr(<nN>,<cFlow>,<nRRate>,<nFRate>)
  832.  
  833. --------------------------------------------------------------------------------
  834. ARRAY.PRG -- Array Processing Routines
  835. --------------------------------------------------------------------------------
  836. AFill()     -- Fills an array with sequential elements. Useful for testing
  837.                array processing routines.
  838.                Usage: FillArray(<aArray>,<nArraySize>,<nFirstValue>,<nStep>)
  839. AMask()     -- Returns a "mask" specifying the desired row or column of an
  840.                array.
  841.                Usage: AMask(<cArrayskel>,<cVar>)
  842. AMean()     -- Mean of non-blank numeric or date values in specified row or
  843.                column of an array.
  844.                Usage: AMean(<cArrayskel>)
  845. AMax()      -- Maximum non-blank numeric, date or character value in specified
  846.                row or column of an array.
  847.                Usage: AMax(<cArrayskel>)
  848. AMin()      -- Minimum non-blank numeric, date or character value in specified
  849.                row or column of an array.
  850.                Usage: AMin(<cArrayskel>)
  851. AVar()      -- Finds population variance of non-blank numeric or date values
  852.                in specified row or column of a specified array.
  853.                Usage: AVar(<cArrayskel>)
  854. ASeek()     -- Performs a binary search in any specified ascending-sorted row
  855.                or column of an array.
  856.                Usage: aSeek(<cFindItem>,<aArray>,<nArraySize>)
  857. AShuffle()  -- Performs a shuffle of elements of an array randomly ...
  858.                Usage: aShuffle(<aArray>,<nLength>)
  859. ABubble()--    Performs a bubble sort (slow) on an array. By telling the
  860.                routine the number of passes, you can have it stop at a specific
  861.                point, and obtain some of the highest or lowest values, without
  862.                taking the time to perform a complete sort. To perform a
  863.                complete sort, pass the same value for nPasses as for nLength 
  864.                (number of elements in array) -- if you want a complete sort,
  865.                however, you may want to take another look at ShellSort()
  866.                below ... it's faster.
  867.                Usage: aBubble(<aArray>,<nLength>,<nPasses>)
  868. ArrayRows() -- Returns number of rows (elements) in an array.
  869.                Usage: ArrayRows(<aArray>)
  870. ArrayCols() -- Returns number of columns in an array.
  871.                Usage: ArrayCols(<aArray>)
  872. ShellSort() -- Performs a fast sort routine on an array. This array must be
  873.                copied into an array called: aMyArray. 
  874.                Usage: ShellSort(<nNumber>)
  875. ARec2Arr()  -- Creates a public array, aRecord[n], initialized to the record
  876.                format of the currently selected DBF, either blank or filled
  877.                with the values of the current record.
  878.                Usage: ARec2Arr(<lBlank>)
  879. aPullSort() -- Performs a sort on an array. This array must be copied into an
  880.                array called: aMyArray. This routine is theoretically faster than
  881.                the ShellSort() routine above, and definitely faster than the
  882.                aBubble() routine above.
  883.                Usage: aPullSort(<nNumber>)
  884.  
  885. --------------------------------------------------------------------------------
  886. MEASURE.PRG -- Conversion of Measurements
  887. --------------------------------------------------------------------------------
  888. Kg2Lb()     -- Used to convert Kilograms to Pounds.
  889.                Usage: Kg2Lb(<nKg>)
  890. Lb2Kg()     -- Used to convert Pounds to Kilograms.
  891.                Usage: Lb2Kg(<nPounds>)
  892. Inch2Cm()   -- Inches to Centimeters.
  893.                Usage: Inch2Cm(<nInches>)
  894. Cm2Inch()   -- Centimeters to Inches.
  895.                Usage: Cm2Inch(<nCm>)
  896. Km2Mile()   -- Kilometers to Miles.
  897.                Usage: Km2Mile(<nKm>)
  898. Mile2Km()   -- Miles to Kilometers.
  899.                Usage: Mile2Km(<nMiles>)
  900. Km2Naut()   -- Kilometers to Nautical miles.
  901.                Usage: Km2Naut(<nKm>)
  902. Naut2Km()   -- Nautical miles to Kilometers.
  903.                Usage: Naut2Km(<nNautMiles>)
  904. Naut2Stat() -- Nautical miles to Statute miles (approximate).
  905.                Usage: Naut2Stat(<nNautMiles>)
  906. Stat2Naut() -- Statute miles to Nautical miles (approximate).
  907.                Usage: Stat2Naut(<nStatMiles>)
  908. Fahr2Cel()  -- Fahrenheit to Celsius.
  909.                Usage: Fahr2Cel(<nFahrTemp>)
  910. Cel2Fahr()  -- Celsius to Fahrenheit.
  911.                Usage: Cel2Fahr(<nCelTemp>)
  912. Gal2Ltr()   -- US Gallons to Liters
  913.                Usage: Gal2Ltr(<nGal>)
  914. Ltr2Gal()   -- Liters to US Gallons
  915.                Usage: Ltr2Gal(<nLiters>)
  916. CuFt2Gal()  -- Cubic feet to US Gallons
  917.                Usage: CuFt2Gal(<nCubicFeet>)
  918. Gal2CuFt()  -- US Gallons to Cubic Feet
  919.                Usage: Gal2CuFt(<nGallons>)
  920.  
  921. --------------------------------------------------------------------------------
  922. TRIG.PRG -- Trigonometric Functions
  923. --------------------------------------------------------------------------------
  924. Note, all of these have the Usage:  FUNC(<nX>)
  925.  
  926. Secant()    -- Secant of an angle X in radians.
  927. Cosecant()  -- CoSecant of an angle X in radians.
  928. CoTan()     -- CoTangent of an angle X in radians.
  929. ASec()      -- Inverse Secant - angle size in radians.
  930. ACoSec()    -- Inverse Cosecant - angle size in radians.
  931. ACoT()      -- Inverse CoTangent
  932. SinH()      -- Hyperbolic Sine
  933. CosH()      -- Hyperbolic CoSine
  934. TanH()      -- Hyperbolic Tangent
  935. SecH()      -- Hyperbolic Secant
  936. CScH()      -- Hyperbolic CoSecant
  937. CoTH()      -- Hyperbolic CoTangent
  938. ASinH()     -- Inverse Hyperbolic Sine
  939. ACosH()     -- Inverse Hyperbolic CoSine
  940. ATanH()     -- Inverse Hyperbolic Tangent
  941. ASecH()     -- Inverse Hyperbolic Secant
  942. ACscH()     -- Inverse Hyperbolic CoSecant
  943. ACotH()     -- Inverse Hyperbolic Cotangent
  944. Hav()       -- Haversine 
  945. AHav()      -- Inverse Haversine
  946.  
  947. --------------------------------------------------------------------------------
  948. NAVIGATE.PRG -- Navigation Routines
  949. --------------------------------------------------------------------------------
  950. Correct()   -- Correction of direction - adjusts direction given, in degrees,
  951.                by a second number of degrees.
  952.                Usage: Correct(<nDirection>,<xCorrection>)
  953. UnCorrect() -- Uncorrection of direction - adjusts direction given, as above.
  954.                This is the inverse of Correct().
  955.                Usage: UnCorrect(<nDirection>,<xUnCorr>)
  956. XAngle()    -- Angle in degrees (<=90) at which two vectors in degrees
  957.                intersect.
  958.                Usage: XAngle(<nVector1>,<nVector2>)
  959. LeftWind()  -- Effect of second vector on first.
  960.                Usage: LeftWind(<nCourse>,<nWindFrom>)
  961. TailWind()  -- Is the effect of second vector on first additive?
  962.                Usage: TailWind(<nCourse>,<nWindFrom>)
  963. Heading()   -- Heading required to make good a course.
  964.                Usage: Heading(<nCourse>,<nAirspeed>,<nWindFrom>,<nForce>)
  965. Course()    -- Course made good given heading, speed, wind dir, and force.
  966.                Usage: Course(<nCourse>,<nAirspeed>,<nWindFrom>,<nForce>)
  967. GndSpeed()  -- Speed over the ground given heading, etc.
  968.                Usage: GndSpeed(<nCourse>,<nAirspeed>,<nWindFrom>,<nForce>)
  969. Deg2Num()   -- Degrees to numbers ... converts character description of
  970.                degrees (Degrees Minutes Seconds:  40d50'30.2 N) to numeric
  971.                value.
  972.                Usage: Deg2Num("<cDms>")
  973. BearsDist() -- Distance to an object at the time of the second bearing.
  974.                Usage: BearsDist(<nBear1>,<nBear2>,<nRun>)
  975. BearsPass() -- Distance at which an object will be when abeam given 2 bearings.
  976.                Usage: BearsPass(<nBear1>,<nBear2>,<nRun>)
  977. BearsRun()  -- Distance to run until object will be abeam given two bearings.
  978.                Usage: BearsRun(<nBear1>,<nBear2>,<nRun>)
  979. GCDist()    -- Great Circle distance between 2 points given latitude and long.
  980.                of each. 
  981.                Usage: GcDist(<cLat1>,<cLon1>,<cLat2>,<cLon2>)
  982. GcCourse()  -- Initial Great Circle course between two points given lat and 
  983.                long of each. (Following a 'Great Circle' requires course 
  984.                changes.
  985.                Usage: GcCourse(<cLat1>,<cLon1>,<cLat2>,<cLon2>)
  986.  
  987. --------------------------------------------------------------------------------
  988. STATS.PRG -- Statistical Routines
  989. --------------------------------------------------------------------------------
  990. Samplevar() -- Finds sample variance of specified field of the current database.
  991.                Usage: SampleVar(<cField>[,<cClause>])
  992. Stny()      -- Returns value of the standard normal distribution function given
  993.                a number of standard deviations from the mean.
  994.                Usage: Stny(<nDevs>)
  995. StnArea()   -- Area of the standard normal distribution function between mean
  996.                and given number of standard deviations from the mean.
  997.                Usage: StnArea(<nDevs>)
  998. Stnz()      -- Lookup table to find the values of 'z', standard deviations,
  999.                corresponding to the most common areas inside a given number
  1000.                of tails of the normal distribution function.
  1001.                Usage: Stnz(<nProb>,<nTails>)
  1002. StnDiff()   -- Determines whether hypothesis that sample of a given mean is
  1003.                different from expected mean is justified.
  1004.                Usage: StnDiff(<nConf>,<nTails>,<nSample>,<nSampMean>,;
  1005.                                <nPopMean>,<nPopStd>)
  1006. StnDevs()   -- Calculates 'z', standard deviations, corresponding to any
  1007.                area of standard normal curve between mean and the desired
  1008.                z. Much slower than Stnz().
  1009.                Usage: StnDevs(<nArea>)
  1010. TstnArea()  -- Translation function to convert area to left of point under
  1011.                standard normal curve to 0 for ZeroIn().
  1012.                Usage: TstnArea(<nDevs>,<nArea>)
  1013. ZeroIn()    -- Finds a zero of a continuous function.
  1014.                Usage: ZeroIn(<cFunction>,<fX1>,fX2>,<fAbsError>,<nMaxiter>,;
  1015.                               <n_Flag>)
  1016.  
  1017. --------------------------------------------------------------------------------
  1018. FIELDS.PRG -- Field Processing Routines
  1019. --------------------------------------------------------------------------------
  1020. MemoPagr()  -- Used to display a memo in a window on screen, allows user to
  1021.                scroll up and down through memo.
  1022.                Usage: MemoPagr("<cMemo>",<nULRow>,<nULCol>,<nBRRow>,<nBRCol>)
  1023. ScanMemo    -- Used to remove hard returns in all memo fields in all records
  1024.                of a specified database.
  1025.                Usage: Do ScanMemo with "<cDbf>"
  1026. Cut         -- Used to cut to a global memvar CLIPBOARD the contents of a field
  1027.                or memvar on screen (during a read) -- can then be used with
  1028.                PASTE.
  1029.                Usage: do Cut with "<cFld>","<cScrType>"
  1030. Copy        -- Used to COPY to a global memvar CLIPBOARD the contents of a
  1031.                field or memvar on screen, so it can be used with PASTE.
  1032.                Usage: do Copy with "<cFld>"
  1033. Paste       -- Used to paste the contents of CLIPBOARD (global memvar) to
  1034.                the current field.
  1035.                Usage: do Paste with "<cFld>","<cScrType>"
  1036. Blanker()   -- Used to blank out a numeric field upon input of a valid numeric
  1037.                item. Useful with GETs ...
  1038.                Usage: Blanker()
  1039. GetRange()  -- Get a range for use with "SET KEY" or "SET FILTER" commands,
  1040.                works with character, numeric, float and date types.
  1041.                Usage: GetRange(<cTitle>,<xPara1>,<xPara2>,<cPicture>,;
  1042.                                <nStartRow>,<cColor>[,<cStyle>])
  1043. FldWidth()  -- Return the width of a field, without having to load the
  1044.                database structure into a file ...
  1045.                Usage: FldWidth(<nField>)
  1046. FldDec()    -- Returns the decimal position in a numeric field.
  1047.                Usage: FldDec(<nField>)
  1048.  
  1049. --------------------------------------------------------------------------------
  1050. FILES.PRG -- File Handling Routines
  1051. --------------------------------------------------------------------------------
  1052. AllTags     -- Used to bring up a popup/picklist of MDX tags ... can be
  1053.                assigned to a function key.
  1054.                Usage: do AllTags with <nULRow>,<nULCol>
  1055. RedoTags    -- Used to deal with "bloated" MDX files. This will delete old
  1056.                tags and recreate the MDX file, reducing the size of it, and
  1057.                making access faster. 
  1058.                Usage: do RedoTags with "<cDBF>" && note, do not include ext.
  1059. AutoRedo    -- Used to bring up a picklist of DBF files, so that you (or the
  1060.                user) can choose which to redo the tags for.
  1061.                Usage: do AutoRedo with <nXTL>,<nYTL>,<nXBR>,<nYBR>,<cColor>)
  1062. PrntTags    -- Used to print a list of tags/expressions to either the printer
  1063.                or a file for a specific database.
  1064.                Usage: do PrntTags with "<cDBF>"
  1065. ListDBFs    -- Used to create a simple database (DBFS.DBF) containing the names
  1066.                of all databases in the current directory.
  1067.                Usage: do ListDBFs
  1068. ReCompile() -- Recompiles all dBASE source-code files. 
  1069.                Usage: Recompile([<cDir>],[,<cSkel>[,"R"]])
  1070. MakeDbf     -- Makes an empty DBF.
  1071.                Usage: Do MakeDbf with <cFileName>,<aArray>
  1072. MakeDbf2    -- Makes an empty DBF, assumes array aMakeDBF[n,5].
  1073.                Usage: Do MakeDBF with <cDBFpath>,<cStruPath>
  1074. MakeStru()  -- Makes an empty dBASE Structure EXTENDED file and returns its
  1075.                root name.
  1076.                Usage: MakeStru()
  1077. MakeStru2() -- Makes an empty dBASE Structure EXTENDED file, using dBASE print
  1078.                redirection. User/programmer may specify to save database
  1079.                in directory specified by DBTMP (DOS Environment variable) or
  1080.                in the current directory.
  1081.                Usage: MakeStru2(<lDBTmp>)
  1082. TempName()  -- Returns a name that can be used for a file of given extension
  1083.                without conflicting with names of existing files. If extension
  1084.                is 'DBF', assures that no .DBT or .MDX of that name exists as 
  1085.                well.
  1086.                Usage: TempName(<cExtension>,<lDBTmp>)
  1087. FileMove    -- Used to handle data entry/editing, allowing the user to move
  1088.                through the database by pressing specific keys. See internal
  1089.                docs for more detail.
  1090.                Usage: do FileMove with <nKey>
  1091. Used()      -- Checks to see if a database is currently in use -- returns a
  1092.                logical.
  1093.                Usage: Used("<cFile>")
  1094. MDXByte()   -- Used to set the MDX Byte in a DBF header ON or OFF.
  1095.                Usage: MDXByte(<cDBFPath>,<cOnOff>)
  1096. aDir()      -- Creates a public array GADIR[n,4] containing directory 
  1097.                information. It is limited to 292 files or less, depending on
  1098.                the memory available. Requires SEARCH.BIN.
  1099.                Usage: aDir(<cFMask>,<cBINPath>,<cAttr>)
  1100. DBFDir()    -- Creates (or Overwrites) DBDDIR.DBF, and populates it with
  1101.                directory information. Uses the DOS 5.0 DIR command, and requires
  1102.                DOS 5.0. DO NOT ATTEMPT TO USE WITH PREVIOUS VERSIONS OF DOS.
  1103.                Usage: DBFDir(<cPathSkel>,<lHidSys>)
  1104. ParsPath()  -- Extracts and returns the path from a full path file 
  1105.                specification.
  1106.                Usage: ParsPath(<cFullPath>)
  1107. TagPop      -- Brings up a picklist of .MDX Tags for current database, so user
  1108.                can change sequence data is listed in. Lists key, whether or not
  1109.                tag has a 'for' clause or is unique, and gives most (if not all)
  1110.                of expression for the tag.
  1111.                Usage: do TagPop
  1112. AAppend()   -- Appends a text file into an array. This routine is limited to
  1113.                text files of 1,170 lines, and 254 characters per line. The
  1114.                text file must be an ASCII .TXT formatted file. Warning -- if
  1115.                array already exists, it will be overwritten.
  1116.                Usage: AAppend(<cFileName>,<aArrayName>)
  1117. FDel()      -- Deletes a given portion of a file (text or binary) from the
  1118.                beginning of the file, end of the file, or current pointer
  1119.                position. 
  1120.                Usage: FDel(<nHandle>,<nBytes>,<nStart>)
  1121. FGetLine()  -- Extracts a line of text from a text file.
  1122.                Usage: FGetLine(<cFileName>,<cLookup>[,<lCase>[,<lEntire>]])
  1123. FIns()      -- Inserts specified number of nulls into a low-level file. See
  1124.                comments on FDel().
  1125.                Usage: FIns(<nHandle>,<nBytes>,<nStart>)
  1126. GetInfo()   -- Retrieves information from STATUS that you cannot get with the
  1127.                dBASE IV function SET(). Keywords are:
  1128.                    WORK       Number of work area currently in
  1129.                    PRINT      Current printer destination (PRN, NUL, etc.)
  1130.                    ERROR      Error condition set by ON ERROR
  1131.                    ESCAPE     Escape condition set by ON ESCAPE
  1132.                    F2 to F10
  1133.                    Ctrl-F1 to Ctrl-F10
  1134.                    Shift-F1 to Shift-F10
  1135.                               Current setting of each key as set by SET FUNCTION
  1136.                    PAGE,LINE  Line number specified by ON PAGE AT LINE
  1137.                    HANDLE,<filename>
  1138.                               Handle number of low-level file <filename>
  1139.                    NAME,<filehandle>
  1140.                               Filename of low-level file specified by 
  1141.                                 <filehandle>
  1142.                    MODE,<filehandle>
  1143.                               Privilege of low-level file spec. by <filehandle>
  1144.                Usage: GetInfo(<cKeyWord>[,<cKeyWord2>])
  1145. TextLine()  -- Returns the number of lines of text in an ASCII Text file.
  1146.                Usage: TextLine(<cTextFile>)
  1147. TLine()     -- Returns a specific line in an ASCII Text File.
  1148.                Usage: TLine(<cTextFile>,<nLine>)
  1149. TLineNo()   -- Returns the line number of the phrase you are searching for
  1150.                in an ASCII Text File.
  1151.                Usage: TLineNO(<cTextFile>,<cLookup>[,<lCase])
  1152. TempFile()  -- Returns a random filename in temporary directory.
  1153.                Usage: TempFile([cFileExt])
  1154. TempDir()   -- Returns path of temporary directory as set from DOS (i.e.,
  1155.                SET DBTMP=...).
  1156.  
  1157. --------------------------------------------------------------------------------
  1158. MISC.PRG -- Miscellaneous Routines
  1159. --------------------------------------------------------------------------------
  1160. PlayIt()    -- Plays a song based on parameter passed. 1 = Dirge, 
  1161.                2 = "touchdown", programmer may add more as needed ...
  1162.                Usage: PlayIt(<nSong>)
  1163. PageEst     -- Will estimate number of pages in a report, and then ask if you
  1164.                wish to generate said report ... requires three parameters:
  1165.                nCount = record count (may be 0, in which case procedure will
  1166.                         try to count the records)
  1167.                cReport = report name, with any FOR condition you wish -- if
  1168.                          you use a FOR condition, and give a '0' for the nCount
  1169.                          parameter, the procedure will count the records that
  1170.                          match the FOR (only a FOR is setup at the moment).
  1171.                nRecords = number of records that will print on a page. If you
  1172.                          send '0', the procedure will calculate based on 60 
  1173.                          records to the page.
  1174.                Usage: do PageEst with <nCount>,"<cReport>",<nRecords>
  1175. Permutes()  -- Permutations of a number of items taken x amount at a time.
  1176.                Usage: Permutes(<nNum>,<nHowMany>
  1177. Combos()    -- Combinations, similar to above -- slight difference. See docs.
  1178.                Usage: Combos(<nNum>,<nHowMany>)
  1179. BinLoad()   -- A function used to manage .BIN files.
  1180.                Usage: BinLoad(<cBinName>)
  1181. DialUp()    -- A simple dialer routine. (No longer requires LOWLEVEL.BIN)
  1182.                Usage: DialUp(<cPhoneNo>)
  1183. CurrPort()  -- Returns the current port being used by the SET PRINT command.
  1184.                Requires a database (CURRPORT.DBF, one field, 80 characters,
  1185.                called CURRPRT, indexed on said field ...)
  1186.                Usage: CurrPort()
  1187. FileLock()  -- Returns a logical if an attempt to lock a file on a LAN was
  1188.                successful, displays a message otherwise.
  1189.                Usage: FileLock("<cColor>")
  1190. RecLock()   -- Returns a logical if an attempt to lock a record on a LAN was
  1191.                successful, displays a message otherwise.
  1192.                Usage: RecLock("<cColor>")
  1193. UserID()    -- Returns the userid of the current user on a LAN. Returns a null
  1194.                string if not on a LAN.
  1195.                ** IF USING dBASE IV, 1.1 or less, requires USERID.BIN **
  1196.                Usage: UserID()
  1197. DosShell    -- Swaps out dBASE from memory, loads a DOS shell.
  1198.                Usage: do DosShell with <cAppName>
  1199. IsDisk()    -- Checks a disk in a disk drive to see if it's valid (door open,
  1200.                unformatted disk, etc.). ** Uses DISK.BIN **
  1201.                Usage: IsDisk("<cDrive>","<cColMess>","<cColErr>")
  1202. BlankIt     -- Used to act like a screen saver for dBASE. Displays a clock
  1203.                on the screen, waits for user to press <Esc> key.
  1204.                Usage: do BlankIt
  1205.                (suggest: ON KEY LABEL ALT-B DO BlankIt)
  1206. ClockIt     -- Used as part of BlankIt routine.
  1207. Clock       -- Same.
  1208. AuxMsg()    -- Will send output to a secondary monitor, if OX.SYS is loaded
  1209.                (via CONFIG.SYS).
  1210.                Usage: AuxMsg(<cMsg>,<lLF>)
  1211. GCD()       -- Greatest Common Divisor of two integers. Usually known as
  1212.                Euclid's Algorithm. 
  1213.                Usage: GCD(<n1>,<n2>)
  1214. RandSel()   -- Random Selection of Integers. Note that version 1.1 users
  1215.                will need to make some minor changes to this routine.
  1216.                Usage: RandSel(<nN>,<nT>[,<cArray>[,<lReSeed>]])
  1217.  
  1218. --------------------------------------------------------------------------------
  1219. PICKLIST.PRG -- "Generic" Picklist Routines
  1220. --------------------------------------------------------------------------------
  1221. Pick1()     -- Ken Holloway's generic picklist routine, allows user entering
  1222.                first letter of item, tab to another column, back tab, and so 
  1223.                on. Pretty spiffy.
  1224.                Usage: Pick1(<cTitle>,<cDisplay>,<cReturn>,<cKey>,<nFromRow>,;
  1225.                             <nFromCol>,<nToRow>,<nToCol>,<cColor1>,<cColor2>)
  1226. Pick2()     -- This picklist routine creates a picklist that determines it's
  1227.                own location on the screen by calling a couple of other functions
  1228.                (below) (uses BROWSE command -- Malcom C. Rubel).
  1229.                Usage: Pick2("<cLookFile>","<cTag>","<cSrchFld>","cRetFld>",;
  1230.                             <nScrRow>,<nScrCol>)
  1231. ScrRow()    -- Returns the row position of the current 'Get'. If the memvar
  1232.                nScrRow already exists, it returns the value in that memvar.
  1233.                Usage: ScrRow()
  1234. ScrCol()    -- Returns the column position of the current 'Get'. Works like 
  1235.                above, but for column.
  1236.                Usage: ScrCol()
  1237. Pick3       -- Martin Leon's DIYPOP routine. 
  1238.                Usage: do Pick2 with <cFields>,<nULRow>,<nULCol>,<nBRRow>,;
  1239.                                     <nBRCol>,<cNormCol>,<cFieldCol>,<cBorder>
  1240. Pick4()     -- Keith G. Chuvala's black-box picklist routine. This one's
  1241.                another rather spiffy routine. Includes selection of file,
  1242.                order and a "set key to" parameter, and ability to return
  1243.                value in the "normal" return manner, or to keyboard into
  1244.                a field.
  1245.                Usage: Pick4(<nRow>,<nCol>,<cTitle>,<cFileSpecs>,<cListWhat>,;
  1246.                             <nRetChar>,<nReturnType>,cColors)
  1247. PopList()   -- Used to replace the @M picture clause, use with a VALID REQUIRED
  1248.                clause. Can handle up to 9 parameters.
  1249.                Usage: PopList(<cOpt1>,<cOpt2>,...<cOpt9>)
  1250. Diacrit     -- Used to "keyboard" letters with diacritical marks directly into
  1251.                a field or memvar on screen, without requiring you memorize those
  1252.                dreary ASCII Codes. REQUIRES USE OF LocPop() below.
  1253.                Usage: on key label <keydef> do diacrit
  1254. LocPop()    -- Used to set upper left corner coordinates for a popup based on
  1255.                current "GET", used with WHEN clause of a get.
  1256.                Usage: LocPop(<nWidth>,<nLength>)
  1257.  
  1258. --------------------------------------------------------------------------------
  1259. SCA.PRG -- SCA Date Handling Routines
  1260. --------------------------------------------------------------------------------
  1261. SCA_Real    -- Special purpose for SCA (Society for Creative Anachronism),
  1262.                brings up a window, enter date in SCA dates, converts to "real"
  1263.                dates (dBASE format).
  1264.                Usage: do SCA_Real
  1265. SCA2Real()  -- This function works like SCA_Real, without the user-input.
  1266.                Usage: SCA2Real(<cDay>,<cMonth>,<cYear>) && cyear=Roman Numeral
  1267. Real_SCA()  -- Used to convert 'real' (dBASE format) dates into SCA dates.
  1268.                (see SCA_Real Procedure above)
  1269.                Usage: Real_SCA(<dDate>)
  1270.  
  1271. --------------------------------------------------------------------------------
  1272. FRPG.PRG -- FRPG (Fantasy Role-Playing Games) ROUTINES
  1273. --------------------------------------------------------------------------------
  1274. SetRand     -- Procedure used to set a random # table, based on the time it
  1275.                is called, multiplied by the seconds at that moment. Useful
  1276.                for calling before using any of routines below. Used ONCE
  1277.                in a dBASE session, should be enough. The reason for this
  1278.                procedure is that I have found that using RAND(-1) often returns
  1279.                exactly the same values if the exact same function call (i.e.,
  1280.                Dice() below) is made several times. This doesn't, therefore,
  1281.                do what I want. By using the current TIME, I can get a different
  1282.                random number table each time. Use EITHER this function OR
  1283.                RAND(-1) during any one session of dBASE.
  1284. Dice()      -- Used to simulate the roll of a dice, will handle different types
  1285.                of dice (for FRPG type games, where you have 4,6,8,10,12,20,100
  1286.                sided dice ...)
  1287.                Usage: Dice(<nSides>)
  1288. MultDice()  -- As above but for multiple die (more than one).
  1289.                Usage: MultDice(<nNum>,<nSides>)
  1290. ValiDice()  -- Asks a gamer to enter a valid die roll, GM/Programmer specifies
  1291.                # of dice, number of sides ... (i.e., 3d6 is 3 six-sided dice,
  1292.                if GM says: 3,6 the program will ask for a value from 3 to 18,
  1293.                and not allow any other input).
  1294.                Usage: ValiDice(<nNum>,<nSides>,"<cMessage>","<cColor>")
  1295. DiceChoose()-- Presents three choices (in menu format) for gamer to use, die
  1296.                dice rolls ...
  1297.                Usage: DiceChoose(<nNum>,<nSides>,"<cMessage>","<cColor>")
  1298. ParseDice() -- Used to parse character field/memvar for xdy+z format of dice
  1299.                (a standard gaming format) and evaluate the value. I.e.,
  1300.                3d6+1 = 3 six-sided dice, +1 for each die rolled, giving a
  1301.                range from 6 to 21 -- function will return random number in 
  1302.                that range (actually "rolling" 3 six-sided dice, adding 1 in
  1303.                example). 
  1304.                Usage: ParseDice("<cDiceString>")
  1305. PopDice        Used to popup a place the user can enter a quick die roll, and
  1306.                have the computer do the actual dice rolling. Handy little
  1307.                routine ...
  1308.                Usage: do PopDice with <cColor>
  1309.                Example: ON KEY LABEL ALT-D DO POPDICE WITH "rg+/rg,w+/n,rg+/rg"
  1310.  
  1311. --------------------------------------------------------------------------------
  1312. WINDOWS.PRG -- People are beginning to want things that look like MicroSoft
  1313. Windows. Here are routines that do some of that. 
  1314. --------------------------------------------------------------------------------
  1315. Alert()      -- A popup with an "OK" pad, designed to force the user to
  1316.                 acknowledge the message.
  1317.                 Usage: Alert("<cTitle>","<cMessage>")
  1318. CheckBox()   -- One line message, with a check box to change the status of
  1319.                 a logical memvar.
  1320.                 Usage: CheckBox(<lVar>,"<cTitle>",<nRow>,<nCol>,<nAscii>)
  1321. CheckBx1()   -- Same as above, but is programmed a bit differently.
  1322.                 Usage: CheckBx1(<lVar>,"<cTitle>",<nRow>,<nCol>)
  1323. DropDown()   -- Performs a picklist with an array, or a field in a database.
  1324.                 Holds a choice in a holding area, allowing user to use that,
  1325.                 or select something else.
  1326.                 Usage: DropDown("<cType>","<cName>",[<nRow,[<nCol>,[<nSize>]]])
  1327. MSWind()     -- Creates a window that acts like a "MS Windows" window, in that
  1328.                 you can move it, enlarge it to full screen, and bring it
  1329.                 back to its original size.
  1330.                 Usage: MSWind(<nTop>,<nLeft>,<nLower>,<nRight>)
  1331. Enlarge      -- Routine used with MSWIND() above to enlarge the window.
  1332.                 Usage: do Enlarge
  1333. MoveWinU     -- Routine used to Move the window (MSWIND()) up on the screen.
  1334.                 Usage: do MoveWinU
  1335. MoveWinD     -- Same as above to move window (MSWIND()) down.
  1336.                 Usage: do MoveWinD
  1337. MSWinAct     -- Used to perform action(s) inside the window (MSWIND()).
  1338.                 This routine should be modified for each specific system ...
  1339.                 This one is just a sample ...
  1340.                 Usage: do MSWinAct with <nTop>,<nLeft>
  1341. RadioBut()   -- Radio Button routine.
  1342.                 Usage: RadioBut("<cArray>",<nRow>,<nCol>,<nDefPad>,<nAscii>)
  1343. TmpRadio     -- Used to set/reset temporary array aTmpRadio used with RadioBut()
  1344.                 routine above.
  1345.                 Usage: Do TmpRadio
  1346. ScrolBar()   -- Performs a horizontal scroll-bar to find a record in a database
  1347.                 file.
  1348.                 Usage: ScrolBar(<nAtLine>)
  1349. MSWind2()    -- Acts like above, but title (due to a ... feature ... of dBASE IV
  1350.                 version 1.5) does not display if enlarged.
  1351.                 Usage: MsWind2(<nTop>,<nLeft>,<nLower>,<nRight>,"<cColor>",;
  1352.                                "<cTitle>")
  1353. Enlarge2     -- Used with MSWind2() to enlarge to full-screen.
  1354.                 Usage: do Enlarge2 with cTitle, cTitlCol
  1355. MoveWind     -- Used with MSWind2() to move the window.
  1356.                 Usage: do MoveWin with <pPad>
  1357. MSWinAt2     -- Used to perform an action inside the window from MSWind2().
  1358.                 Usage: do MSWinAt2
  1359. FieldNum()   -- Used to return the number of a given fieldname in the database
  1360.                 structure. Works only on an open database.
  1361.                 Usage: FieldNum("<cFldName>")
  1362. Alert3()     -- An enhanced version of Alert2() in PROC.PRG
  1363.                 Usage: Alert3("<cTitle>","<cMessage>","<cColor>")
  1364. YesNo3()     -- A version of YESNO() that deals with a message of up to 254
  1365.                 characters. 
  1366.                 Usage: YesNo3(<lDefault>,<cTitle>,<cMessage>,<cColor>)
  1367.  
  1368. --------------------------------------------------------------------------------
  1369. ERRLOG.PRG -- A program to hold error-handling routines for dBASE IV.
  1370. --------------------------------------------------------------------------------
  1371. ErrorLog     -- This is used to generate an errorlog for the programmer,
  1372.                 giving much vital information about the system at the time
  1373.                 a program bombed. It can print the screen to disk as well
  1374.                 as to paper, and can send a Novell Netware message to the
  1375.                 programmer as well. (If you use print screen to paper or disk,
  1376.                 you will require the use of PRINTSCR.BIN and/or SCREEN.BIN.)
  1377.                 Usage: Do ErrorLog with error(),lineno(),program(),alias(),;
  1378.                           memory()[,<lPrntScrn>[,<lScrn2Disk>[,<cNetId>]]])
  1379.  
  1380. --------------------------------------------------------------------------------
  1381. HELPROC.PRG -- A program to deal with programmer defined Help. This system 
  1382. requires the use of HELPER.DBF and HELPER.FMT. This is a "black box" routine.
  1383. Please read the instructions in HELPROC.PRG before attempting use ...
  1384. --------------------------------------------------------------------------------
  1385. Helper       -- The actual HELP program, assigned to F1 
  1386.                             (ON KEY LABEL F1 DO HELPER)
  1387. StrSrch      -- Routine to perform a string search in the help information
  1388.                 (HELPER.DBF). Uses HELPER.FMT to display information on screen.
  1389.  
  1390. --------------------------------------------------------------------------------
  1391. LISTFILE.PRG -- A program written to display an ASCII Text File on the screen.
  1392. It uses some of the low-level routines created by Adam Menkes, and a few
  1393. odd things I threw together (Ken Mayer). It is completely self-contained,
  1394. and may be copied to any directory and used ...
  1395.   USAGE: Do ListFile with <cFileName>,<nRow>,<nHeight>[,<nTabs>[,<cColors>]]
  1396. --------------------------------------------------------------------------------
  1397.  
  1398. --------------------------------------------------------------------------------
  1399. OBSOLETE.PRG -- These are functions that, due to the advent of dBASE IV, 1.5,
  1400. (or other reasons) are no longer necessary. However, if you are a user of 1.1,
  1401. and/or wish to still use these functions, they are still available, but with
  1402. little support.
  1403. --------------------------------------------------------------------------------
  1404. Empty()     -- Returns a logical (.t. or .f.) if a field or memvar is empty. 
  1405.                In release 1.5 this is replaced with the internal function: 
  1406.                ISBLANK().
  1407.                Usage: Empty(<cField>)
  1408.                Recommendation: If creating a system that uses both dBASE IV
  1409.                versions 1.5 and earlier versions, rename this function to 
  1410.                ISBLANK(). If the system is an earlier version of dBASE, this
  1411.                function will be used, and if 1.5 or later, the internal function
  1412.                will be used.
  1413. NumFlds()   -- Counts the fields in a given database. This is replaced in 
  1414.                version 1.5 of dBASE IV with FLDCOUNT().
  1415.                Usage: NumFlds(<cDBF>)
  1416. DateSet()   -- Returns a string giving name of current DATE format.
  1417.                Usage: DateSet()
  1418. StampVal()  -- Evaluates a 16-character string in the form of the rightmost 
  1419.                16 characters returned by the DOS DIR command for a file.
  1420.                Usage: StampVal(<cTimeStamp>)
  1421. FullWin     -- Handy to overlay a screen with a full-screen window ...
  1422.                Usage: do FullWin with "<cColor>","<cWinName>","<cScreen>"
  1423. SetColor    -- used to set a memory file with colors, or load colors into
  1424.                memory variables from a memory file.
  1425.                Usage: do SetColor
  1426. SetColor2   -- used to set a mem file as above, but asks for a parameter to
  1427.                be sent, so that when designing a system, you can ask the
  1428.                user if their monitor is color or mono ... you pass "Y" or
  1429.                "N" ... i.e.,
  1430.                Usage: do SetColor2 with "<cYN>"
  1431. ExtrClr()   -- Used to extract the first parameter of a color memory variable.
  1432.                Usage: ExtrClr(<cColorVar>)
  1433. InvClr()    -- Can invert the colors of a color memory variable.
  1434.                Usage: InvClr(<cColorVar>)
  1435.  
  1436. ================================================================================
  1437. Enjoy. Happy computing. 
  1438.  
  1439. KJM
  1440. --------------------------------------------------------------------------------
  1441. -- EoF: README.TXT
  1442. --------------------------------------------------------------------------------
  1443.